package kr.hkit.powerjava.chapter17.submit;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JTabbedPane;
import javax.swing.BoxLayout;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.Window.Type;

public class MainTabbedPane extends JFrame {

	private JPanel contentPane;
	private JTabbedPane tabbedPane;
	private Swing2 Tab_2;
	private Swing3 Tab_3;
	private Swing1 Tab_1;

	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					MainTabbedPane frame = new MainTabbedPane();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	public MainTabbedPane() {
		initialize();
	}
	private void initialize() {
		setTitle("스윙 컴포넌트 ");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 555, 290);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(new BorderLayout(0, 0));
		
		tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		contentPane.add(tabbedPane);
		
		Tab_1 = new Swing1();
		tabbedPane.addTab("이미지 레이블", null, Tab_1, null);
		
		Tab_2 = new Swing2();
		tabbedPane.addTab("체크 박스", null, Tab_2, null);
		
		Tab_3 = new Swing3();
		tabbedPane.addTab("라디오 버튼", null, Tab_3, null);
		
	}

}
